Thread: [HELP]FIbonacci sequence with formatting

  1. #1
    Registered User
    Join Date
    Sep 2014
    Posts
    1

    [HELP]FIbonacci sequence with formatting

    Good day everyone

    Can somebody helped me here's my problem I made a fibonacci series with label above it now how to put the label after the first layer because as you can see in the screenshot the label is continuous.

    Thanks for the response

    [HELP]FIbonacci sequence with formatting-21321-jpg

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    There's no standardized way to query things like screen size and such in C, so that kind of layout isn't going to work. I would just print the label before each value (eg: "[Xn3 : 2] [Xn4: 3]", etc.) and be done with it...
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    Quote Originally Posted by wenkzz31 View Post
    Can somebody helped me here's my problem I made a fibonacci series with label above it now how to put the label after the first layer because as you can see in the screenshot the label is continuous.
    What is your desired output? The last column "||" don't seem to line up. If that is your question please post the code in a clear way (not in a screenshot) and someone may give advice to fix it. Also some output lines are too long for your console; you may want to make your terminal window wider to make it easier to read.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fibonacci Sequence
    By iGuardian in forum C++ Programming
    Replies: 19
    Last Post: 10-21-2011, 12:34 AM
  2. fibonacci sequence
    By cph in forum C Programming
    Replies: 57
    Last Post: 04-30-2009, 07:17 AM
  3. Fibonacci Sequence
    By Dogmasur in forum C Programming
    Replies: 15
    Last Post: 08-10-2008, 07:55 AM
  4. Fibonacci sequence
    By MuffanMan123 in forum C++ Programming
    Replies: 6
    Last Post: 02-26-2008, 09:15 AM
  5. Fibonacci sequence
    By girliegti in forum C++ Programming
    Replies: 8
    Last Post: 09-30-2003, 10:40 PM